package com.nuoniu.sibanyun.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.nuoniu.sibanyun.common.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.models.auth.In;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.beans.factory.annotation.Autowired;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 * 用户表
 * </p>
 *
 * @author baiqiang
 * @since 2020-04-23
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("sys_user")
@ApiModel(value="SysUser对象", description="用户表")
public class SysUser extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "用户编码")
    @TableField("user_code")
    private String userCode;

    @ApiModelProperty(value = "登录账号")
    @TableField("user_name")
    private String userName;

    @ApiModelProperty(value = "登录密码")
    @TableField("password")
    private String password;

    @ApiModelProperty(value = "加密盐")
    @TableField("salt")
    private String salt;

    @ApiModelProperty(value = "真实姓名")
    @TableField("real_name")
    private String realName;

    @ApiModelProperty(value = "电子邮箱")
    @TableField("email")
    private String email;

    @ApiModelProperty(value = "邮箱认证")
    @TableField("auth_email")
    private String authEmail;

    @ApiModelProperty(value = "手机号码")
    @TableField("mobile")
    private String mobile;

    @ApiModelProperty(value = "办公电话")
    @TableField("phone")
    private String phone;

    @ApiModelProperty(value = "用户性别")
    @TableField("sex")
    private Boolean sex;

    @ApiModelProperty(value = "头像路径")
    @TableField("avatar")
    private String avatar;

    @ApiModelProperty(value = "个性签名")
    @TableField("sign")
    private String sign;

    @ApiModelProperty(value = "绑定的微信号")
    @TableField("wx_openid")
    private String wxOpenid;

    @ApiModelProperty(value = "绑定的手机串号")
    @TableField("mobile_imei")
    private String mobileImei;

    @ApiModelProperty(value = "用户类型")
    @TableField("user_type")
    private String userType;

//    @ApiModelProperty(value = "管理员类型（0非管理员 1系统管理员  2二级管理员）")
//    @TableField("mgr_type")
//    private Boolean mgrType;
//
//    @ApiModelProperty(value = "密码安全级别（0初始 1很弱 2弱 3安全 4很安全）")
//    @TableField("pwd_security_level")
//    private Boolean pwdSecurityLevel;
//
//    @ApiModelProperty(value = "密码最后更新时间")
//    @TableField("pwd_update_date")
//    private LocalDateTime pwdUpdateDate;

//    @ApiModelProperty(value = "密码修改记录")
//    @TableField("pwd_update_record")
//    private String pwdUpdateRecord;
//
//    @ApiModelProperty(value = "密保问题")
//    @TableField("pwd_question")
//    private String pwdQuestion;
//
//    @ApiModelProperty(value = "密保问题答案")
//    @TableField("pwd_question_answer")
//    private String pwdQuestionAnswer;
//
//    @ApiModelProperty(value = "密保问题2")
//    @TableField("pwd_question_2")
//    private String pwdQuestion2;
//
//    @ApiModelProperty(value = "密保问题答案2")
//    @TableField("pwd_question_answer_2")
//    private String pwdQuestionAnswer2;
//
//    @ApiModelProperty(value = "密保问题3")
//    @TableField("pwd_question_3")
//    private String pwdQuestion3;
//
//    @ApiModelProperty(value = "密保问题答案3")
//    @TableField("pwd_question_answer_3")
//    private String pwdQuestionAnswer3;
//
//    @ApiModelProperty(value = "密码问题修改时间")
//    @TableField("pwd_quest_update_date")
//    private LocalDateTime pwdQuestUpdateDate;

    @ApiModelProperty(value = "最后登陆IP")
    @TableField("last_login_ip")
    private String lastLoginIp;

    @ApiModelProperty(value = "最后登陆时间")
    @TableField("last_login_date")
    private LocalDateTime lastLoginDate;

    @ApiModelProperty(value = "登录次数")
    @TableField("login_count")
    private Integer loginCount;

    @ApiModelProperty(value = "注册ip")
    @TableField("register_ip")
    private String registerIp;

    @ApiModelProperty(value = "注册地址")
    @TableField("register_address")
    private String registerAddress;

    @ApiModelProperty(value = "注册类型")
    @TableField("register_type")
    private Integer registerType;

//    @ApiModelProperty(value = "冻结时间")
//    @TableField("freeze_date")
//    private LocalDateTime freezeDate;
//
//    @ApiModelProperty(value = "冻结原因")
//    @TableField("freeze_cause")
//    private String freezeCause;

    @ApiModelProperty(value = "用户权重（降序）")
    @TableField("user_weight")
    private BigDecimal userWeight;

    @ApiModelProperty(value = "状态（0正常 1删除 2停用 3冻结）")
    @TableField("status")
    private Integer status;

    @ApiModelProperty(value = "创建者")
    @TableField("create_by")
    private Integer createBy;

    @ApiModelProperty(value = "创建时间")
    @TableField("create_date")
    private LocalDateTime createDate;

    @ApiModelProperty(value = "更新者")
    @TableField("update_by")
    private Integer updateBy;

    @ApiModelProperty(value = "更新时间")
    @TableField("update_date")
    private LocalDateTime updateDate;

    @ApiModelProperty(value = "备注信息")
    @TableField("remarks")
    private String remarks;

    @ApiModelProperty(value = "上级用户id")
    @TableField("share_user_id")
    private Integer shareUserId;

    @ApiModelProperty(value = "上级用户名称")
    @TableField("share_user_name")
    private String shareUserName;

    @ApiModelProperty(value = "迭代父级用户id")
    @TableField("share_user_ids")
    private String shareUserIds;

    @ApiModelProperty(value = "总佣金")
    @TableField("total_commission")
    private BigDecimal totalCommission;

    @ApiModelProperty(value = "已提现佣金")
    @TableField("withdrawal_commission")
    private BigDecimal withdrawalCommission;

    @ApiModelProperty(value = "银行名称")
    @TableField("bank_name")
    private String bankName;

    @ApiModelProperty(value = "银行账号")
    @TableField("bank_account")
    private String bankAccount;

    @ApiModelProperty(value = "租户ID")
    @TableField("company_id")
    private Integer companyId;

    @ApiModelProperty(value = "租户名称")
    @TableField("company_name")
    private String companyName;

    @ApiModelProperty(value = "下级客户数量")
    @TableField(exist = false)
    private Integer crmCount;

    @ApiModelProperty(value = "推客等级")
    @TableField(exist = false)
    private String levelName;

    @ApiModelProperty(value = "所属机构id")
    private Long officeId;

    @ApiModelProperty(value = "所属机构名称")
    private String officeName;

    @ApiModelProperty(value = "所属机构编码")
    private String officeCode;


}
